package cn.z2huo.demo.hello.kafka.support;

import cn.z2huo.demo.hello.kafka.api.KafkaSubscriber;

import java.util.concurrent.ConcurrentHashMap;

/**
 * <p>
 *
 * @author z2huo
 */
public class KafkaSubscriberRegister {

    private static final ConcurrentHashMap<String, KafkaSubscriber> subscribers = new ConcurrentHashMap<>();

    public static void put(String topic, KafkaSubscriber subscriber) {
        subscribers.put(topic, subscriber);
    }

    public static KafkaSubscriber get(String topic) {
        return subscribers.get(topic);
    }
}
